﻿using System;

namespace vBridge.Dwm.Aero.AeroAvailabilityCheckers
{
    /// <summary>
    ///     Checks if composition is currently enabled.
    /// </summary>
    public class CompositionAeroAvailabilityChecker : IAeroAvailabilityChecker
    {
        public Boolean IsEnabled()
        {
            Boolean enabled = false;
            int result = NativeMethods.DwmIsCompositionEnabled(ref enabled);
            return result == 0 && enabled;
        }
    }
}